# -*- mode: snippet -*-
# name: subsec
# key: subsec
# --
\subsection{$1}
  \label{subsec:${1:$(downcase (replace-regexp-in-string " " "_" text))}}
  $0
% subsection ${1:$(downcase (replace-regexp-in-string " " "_" text))} (end)